'use strict';

/**
 * @param {Egg.Application} app - egg application
 */

module.exports = app => {

  const {
    router,
    controller
  } = app;

  // GetSmsVerifyCode

  //IP白名单
  const filterIp = app.middleware.filterIp();

  router.get('/', controller.home.init);

  //发送短信验证码
  router.post('/getSmsCode', controller.getSms.init);

  //查看log日志，默认带有ip白名单限制
  router.get('/logs', filterIp, controller.getLogs.logsList); //查看日历列表
  router.get('/logs/:name', filterIp, controller.getLogs.logsContent); //查看日志详情

};